<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>


</head>
<body>
<div id="div1">
    <time>{{date}}</time>

</div>
<script src="js/vue.js"></script>
<script src="js/data.js"></script>
<script>
    new Vue({
        el: '#div1',
        data: {
            date: new Date(),
            handler: null,
        },
        created() {

        }, mounted() {
            const me = this;
            me.handler = setInterval(function () {
                console.log(this)
                me.date = new Date();
            }, 1000)
        }, beforeDestroy() {
            clearInterval(this.handler)
        }
    })
</script>
</body>
</html>